package user;

import java.util.Collection;

import javax.ejb.CreateException;
import javax.ejb.EJBLocalHome;
import javax.ejb.FinderException;

/**
 * Home interface for the bean UserHome
 * 
 * 	@author Mamadou TOURE
 * 
 *  The UserHome interface defines all the methods that a client can invoke to find, create or destroy
 *  an UserBean.
 *  
 *  Note : 	-It extends the EJBLocalHome interface.
 *  		-We use @SuppressWarnings("unchecked") to avoid the warning about the collection element type.
 */
@SuppressWarnings("unchecked")
public interface UserHome extends EJBLocalHome {
	public User create(String firstName, String name, String login,  String passwd,  String email) throws CreateException;
	
	public Collection findAllUsers() throws FinderException;
	public User findByPrimaryKey(int user_id) throws FinderException;
	public User findByLoginPassword(String login, String password) throws FinderException;
	public User findByLogin(String login) throws FinderException;
}
